package com.yuanfeng.order.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yuanfeng.commoms.dto.PageUserTokenBeanDTO;
import com.yuanfeng.commoms.dto.order.AddInventoryDTO;
import com.yuanfeng.commoms.dto.order.PlatFormMemberSelfQueryDTO;
import com.yuanfeng.commoms.vo.base.BaseDistrictVO;
import com.yuanfeng.commoms.vo.base.KdniaoExpressVO;
import com.yuanfeng.commoms.vo.fx.ShareGoodsVO;
import com.yuanfeng.commoms.vo.goods.GoodsDetailsListVO;
import com.yuanfeng.commoms.vo.goods.WapGoodsSaleSumUpdateVO;
import com.yuanfeng.commoms.vo.job.AcquiescenceVO;
import com.yuanfeng.commoms.vo.order.*;
import com.yuanfeng.commoms.vo.shop.ShopShippingAddressVO;
import com.yuanfeng.commoms.vo.shop.ShopdpexpressVO;
import com.yuanfeng.commoms.vo.shop.ShopkdniaoVO;
import com.yuanfeng.commoms.vo.user.UserInfoOrderDetailVO;
import com.yuanfeng.order.dto.*;
import com.yuanfeng.order.entity.OrderBaseEntity;
import com.yuanfeng.order.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @ClassName OrderBaseMapper
 * @Description 订单详细信息
 * @Author cyp
 * @Date 2023-05-31 11:56:58
 * @Version 1.0
 **/
@Mapper
public interface OrderBaseMapper extends BaseMapper<OrderBaseEntity> {


    /**
     * 新增供应商订单信息
     * @param respData
     */
    void insertSupperOrderBase(@Param("respData") Map<String, Object> respData);

    /**
     * 查询购买积分商品所需积分
     * @param goodsId
     * @return
     */
    Integer getGoodsIntegral(Integer goodsId);

    /**
     * 新增订单信息
     * @param orderId
     * @param shopId
     * @param orderGateShopId
     * @param shopName
     * @param userId
     * @param userName
     * @param sellerId
     * @param sellerUserName
     * @param orderDate
     * @param orderGoodsTime
     * @param orderReceiverName
     * @param orderReceiverAddress
     * @param orderReceiverContact
     * @param orderReceiverProvinceId
     * @param orderReceiverCityId
     * @param orderReceiverAreaId
     * @param paymentNumber
     * @param invoiceName
     * @param invoiceId
     * @param shopPrice
     * @param orderBasePaymentAmount
     * @param orderDiscountFee
     * @param shippingFee
     * @param orderBuyerEvaluationStatusInteger
     * @param buyerMessage
     * @param orderStatus
     * @param orderDiscountType
     * @param couponPrice
     * @param voucherId
     * @param orderFromNum
     * @param redpacketId
     * @param redPacketPrice
     * @param redPacketSumMoney
     * @param platformVoucherCode
     * @param platformVoucherPrice
     * @param platformVoucherShopPrice
     * @param districtId
     * @param parentShopId
     * @param inviteSubsiteId
     * @param treasureOrderShopId
     * @param orderPromotionId
     * @param groupbuyStatus
     * @param orderBuyId
     * @param smallOrder
     * @param liveId
     * @param accountId
     * @param virtualGoods
     * @param periodOfValidity
     * @param pastDue
     * @param shopDistributorId
     * @param orderType
     * @param deliverShopId
     * @param deliverShopName
     * @param orderSupplyPrice
     * @param shareUserId
     * @param integralGoods
     * @param totalIntegral
     * @param orderIsShopTake
     * @param dropShipping
     * @param dealerCommission
     * @param supplyCommission
     * @param payMentCode
     * @param manjianDiscount
     * @param manzheDiscount
     * @param giveawayInfo
     * @param orderBaseCommission
     * @param baseMemberDiscount
     * @param plusOrder
     * @return
     */
    boolean insertByOrderBase(@Param("orderId") String orderId, @Param("shopId") Integer shopId, @Param("orderGateShopId") Integer orderGateShopId,
                              @Param("shopName") String shopName, @Param("userId") String userId, @Param("userName") String userName,
                              @Param("sellerId") String sellerId, @Param("sellerUserName") String sellerUserName,
                              @Param("orderDate") String orderDate, @Param("orderGoodsTime") String orderGoodsTime,
                              @Param("orderReceiverName") String orderReceiverName,
                              @Param("orderReceiverAddress") String orderReceiverAddress,
                              @Param("orderReceiverContact") String orderReceiverContact,
                              @Param("orderReceiverProvinceId") Integer orderReceiverProvinceId,
                              @Param("orderReceiverCityId") Integer orderReceiverCityId,
                              @Param("orderReceiverAreaId") Integer orderReceiverAreaId, @Param("paymentNumber") String paymentNumber,
                              @Param("invoiceName") String invoiceName, @Param("invoiceId") Integer invoiceId,
                              @Param("shopPrice") BigDecimal shopPrice,
                              @Param("orderBasePaymentAmount") BigDecimal orderBasePaymentAmount,
                              @Param("orderDiscountFee") BigDecimal orderDiscountFee, @Param("shippingFee") BigDecimal shippingFee,
                              @Param("orderBuyerEvaluationStatusInteger") Integer orderBuyerEvaluationStatusInteger,
                              @Param("buyerMessage") String buyerMessage, @Param("orderStatus") Integer orderStatus,
                              @Param("orderDiscountType") Integer orderDiscountType, @Param("couponPrice") BigDecimal couponPrice,
                              @Param("voucherId") String voucherId, @Param("orderFromNum") Integer orderFromNum,
                              @Param("redpacketId") String redpacketId, @Param("redPacketPrice") BigDecimal redPacketPrice,
                              @Param("redPacketSumMoney") BigDecimal redPacketSumMoney, @Param("platformVoucherCode") String platformVoucherCode, @Param("platformVoucherPrice") BigDecimal platformVoucherPrice, @Param("platformVoucherShopPrice") BigDecimal platformVoucherShopPrice, @Param("districtId") Integer districtId, @Param("parentShopId") Integer parentShopId,
                              @Param("inviteSubsiteId") Integer inviteSubsiteId, @Param("treasureOrderShopId") Integer treasureOrderShopId, @Param("orderPromotionId") Integer orderPromotionId, @Param("groupbuyStatus") Integer groupbuyStatus, @Param("orderBuyId") String orderBuyId, @Param("smallOrder") Integer smallOrder, @Param("liveId") String liveId, @Param("accountId") String accountId,
                              @Param("virtualGoods") Integer virtualGoods, @Param("periodOfValidity") String periodOfValidity,
                              @Param("pastDue") Integer pastDue, @Param("shopDistributorId") Integer shopDistributorId, @Param("orderType") Integer orderType, @Param("deliverShopId") Integer deliverShopId, @Param("deliverShopName") String deliverShopName, @Param("orderSupplyPrice") BigDecimal orderSupplyPrice, @Param("shareUserId") String shareUserId, @Param("integralGoods") Integer integralGoods, @Param("totalIntegral") Integer totalIntegral, @Param("orderIsShopTake") Integer orderIsShopTake, @Param("dropShipping") Integer dropShipping, @Param("dealerCommission") BigDecimal dealerCommission, @Param("supplyCommission") BigDecimal supplyCommission,
                              @Param("payMentCode") Integer payMentCode, @Param("manjianDiscount") BigDecimal manjianDiscount, @Param("manzheDiscount") BigDecimal manzheDiscount, @Param("giveawayInfo") String giveawayInfo, @Param("orderBaseCommission") BigDecimal orderBaseCommission, @Param("baseMemberDiscount") BigDecimal baseMemberDiscount, @Param("plusOrder") Integer plusOrder);

    /**
     * 查询店铺发票开通状态
     *
     * @param shopId
     * @return
     */
    Integer checkInvoiceSwitchStatus(Integer shopId);

    /**
     * 更新秒杀订单取消时间
     *
     * @param map
     */
    void updateSeckillCancelTime(@Param("param") Map<String, Object> map);

    /**
     * 修改拼团订单状态
     *
     * @param orderIdList
     * @return
     */
    boolean updateGroupBookingBaseStatus(@Param("orderIdList") List<String> orderIdList);

    /**
     * 查询支付单号
     *
     * @param orderId
     * @return
     */
    String queryPayNumber(@Param("orderId") String orderId);

    /**
     * 拼团超时，自动取消
     *
     * @param orderId
     * @param cancelTime
     * @return
     */
    boolean updateGroupBookingBaseOrderStatus(@Param("orderId") String orderId, @Param("cancelTime") String cancelTime);

    /**
     * 取消订单
     *
     * @param payNumber
     * @return
     */
    boolean updateGroupBookingGoodsOrderStatus(String payNumber);

    /**
     * 查询订单 用户信息 及分享人用户信息
     *
     * @param orderIdList
     * @return
     */
    List<ShareGoodsVO> queryFxOrderList(@Param("orderIdList") List<String> orderIdList);

    /**
     * 更新订单最晚售后时间
     *
     * @param orderId
     * @param returnTime
     */
    void updateOrderAfterSaleTime(@Param("orderId") String orderId, @Param("returnTime") String returnTime);

    /**
     * 根据支付单号查询
     *
     * @param paymentNumber
     * @return
     */
    PayDetailsVO querypaymentAmount(@Param("paymentNumber") String paymentNumber);

    /**
     * 根据订单号查询
     *
     * @param paymentNumber
     * @return
     */
    PayDetailsVO querypaymentByOrder(@Param("paymentNumber") String paymentNumber);

    /**
     * 查询订单创建时间及订单状态
     *
     * @param orderId
     * @return
     */
    OrderListVO queryOrderCreateTime(@Param("orderId") String orderId);

    /**
     * 查询订单商品信息
     *
     * @param orderId
     * @return
     */
    List<GoodsDetailsListVO> queryGoodsList(@Param("orderId") String orderId);

    /**
     * 判断商品是否参与秒杀
     *
     * @param goodsId
     * @return
     */
    Integer queryCountForSeckillGoods(@Param("goodsId") Integer goodsId);

    /**
     * 查询取消时间
     *
     * @param seckillId
     * @return
     */
    Integer queryCancelTime(@Param("seckillId") Integer seckillId);

    /**
     * 查询用户积分商品下单数量
     *
     * @param userId
     * @return
     */
    Integer queryintegraOrdersCount(String userId);


    /**
     * 查询商品数量
     *
     * @param orderId
     * @return
     */
    Integer queryGoodNumByOrderId(@Param("orderId") String orderId);

    /**
     * 查询订单数量
     *
     * @param userId
     * @return
     */
    MessageRemindNumVO selectOrderBaseNum(String userId);

    /**
     * 查询返回订单数量
     *
     * @param userId
     * @return
     */
    Map<String, Object> selectOrderReturnNum(String userId);

    /**
     * 查询商品详情
     *
     * @param orderId
     * @return
     */
    List<AddInventoryDTO> queryGoodsDetails(@Param("orderId") String orderId);

    /**
     * 更新订单商品
     *
     * @param orderId
     * @param orderStatus
     * @return
     */
    boolean updateByOrderGoodsForDefaultFinish(@Param("orderId") String orderId,
                                               @Param("orderStatus") Integer orderStatus);

    /**
     * 更新订单
     *
     * @param orderId
     * @param orderStatus
     * @return
     */
    boolean updateByOrderBaseForDefaultFinish(@Param("orderId") String orderId,
                                              @Param("orderStatus") Integer orderStatus);


    /**
     * 更新售后时间
     *
     * @param orderId
     * @param orderLastReturnTime
     */
    void updateByOrderBaseorderLastReturnTime(String orderId, Date orderLastReturnTime);

    /**
     * 更新延迟时间
     *
     * @param userId
     * @param orderId
     * @return
     */
    boolean updateDelayTime(@Param("userId") String userId, @Param("orderId") String orderId);

    /**
     * 查询订单详细信息
     *
     * @param userId
     * @param orderId
     * @return
     */
    SoldOrderByCommonalityDetailsVO soldOrderByCommonalityDetails(@Param("userId") String userId,
                                                                  @Param("orderId") String orderId);

    /**
     * 查询是否改价
     *
     * @param map
     * @return
     */
    Integer queryOrderUpdatePrice(Map<String, Object> map);

    /**
     * 查询订单商品详情
     *
     * @param userId
     * @param orderId
     * @return
     */
    List<SoldOrderByGoodsDetailsVO> soldOrderByGoodsDetails(@Param("userId") String userId,
                                                            @Param("orderId") String orderId);

    /**
     * 获取基础订单
     *
     * @param orderId
     * @return
     */
    OrderBaseVO getOrderBaseById(@Param("orderId") String orderId);

    /**
     * 待付款
     *
     * @param shopId
     * @return
     */
    int WaitingForPaymentTotal(@Param("shopId") Integer shopId, @Param("orderSource") Integer orderSource);

    /**
     * 待发货
     *
     * @param shopId
     * @return
     */
    int WaitForTheDeliveryTotal(@Param("shopId") Integer shopId, @Param("orderSource") Integer orderSource);

    /**
     * 已发货
     *
     * @param shopId
     * @return
     */
    int shippedTotal(@Param("shopId") Integer shopId, @Param("orderSource") Integer orderSource);

    /**
     * 已完成
     *
     * @param shopId
     * @return
     */
    int OffTheStocksTotal(@Param("shopId") Integer shopId, @Param("orderSource") Integer orderSource);

    /**
     * 退货
     *
     * @param shopId
     * @return
     */
    int SalesReturnTotal(@Param("shopId") Integer shopId, @Param("orderSource") Integer orderSource);

    /**
     * 退款订单
     *
     * @param shopId
     * @return
     */
    int RefundTotal2(@Param("shopId") Integer shopId, @Param("orderSource") Integer orderSource);


    /**
     * 销量排名
     *
     * @param shopId
     * @return
     */
    List<SalesRankingVO> querySalesRanking(@Param("shopId") Integer shopId);


    /**
     * 查询每日交易额及订单量
     *
     * @param shopId
     * @return
     */
    SaleRoomVO querySaleByDay(@Param("shopId") Integer shopId, @Param("shopType") Integer shopType);

    /**
     * 查询每日营销额
     *
     * @param shopId
     * @return
     */
    BigDecimal querysalesVolumeByDay(@Param("shopId") Integer shopId, @Param("shopType") Integer shopType);

    /**
     * 查询每周交易额及订单量
     *
     * @param shopId
     * @return
     */
    SaleRoomVO querySaleByWeek(@Param("shopId") Integer shopId, @Param("shopType") Integer shopType);

    /**
     * 查询每周营销额
     *
     * @param shopId
     * @return
     */
    BigDecimal querySalesVolumeByWeek(@Param("shopId") Integer shopId, @Param("shopType") Integer shopType);

    /**
     * 查询每月交易额及订单量
     *
     * @param shopId
     * @return
     */
    SaleRoomVO querySaleByMonth(@Param("shopId") Integer shopId, @Param("shopType") Integer shopType);

    /**
     * 查询每月营销额
     *
     * @param shopId
     * @return
     */
    BigDecimal querySalesVolumeByMonth(@Param("shopId") Integer shopId, @Param("shopType") Integer shopType);


    /**
     * 查询待评价虚拟订单商品信息
     *
     * @param page
     * @param mapOrder
     * @return
     */
    IPage<OrderListVO> queryWaitingEvaluationVirtualOrder(IPage<OrderListVO> page, @Param("param") Map<String, Object> mapOrder);

    /**
     * 查询待评价非虚拟订单商品信息
     *
     * @param page
     * @param mapOrder
     * @return
     */
    IPage<OrderListVO> queryWaitingEvaluationOrder(IPage<OrderListVO> page, @Param("param") Map<String, Object> mapOrder);

    /**
     * 获取商品状态
     *
     * @param commonId
     * @return
     */
    int selCommonStateBySPU(@Param("commonId") Integer commonId);


    /**
     * 查询待评价订单商品信息
     *
     * @param page
     * @param mapOrder
     * @return
     */
    IPage<OrderListVO> queryIntegralWaitingEvaluationOrder(IPage<OrderListVO> page, Map<String, Object> mapOrder);

    /**
     * 查询业务
     *
     * @param userId
     * @param businessId
     * @return
     */
    Map<String, Object> queryBusiness(@Param("userId") String userId, @Param("businessId") String businessId);


    /**
     * 查询员工列表
     *
     * @param businessId
     * @return
     */
    List<String> queryEmployeesList(@Param("businessId") String businessId);

    /**
     * 查询订单商品信息
     *
     * @param page
     * @param param
     * @return
     */
    IPage<OrderBaseEntity> queryOrderGoodsInfo(IPage<OrderBaseEntity> page, @Param("param") Map<String, Object> param);

    /**
     * 获取发票交换信息
     *
     * @param shopId
     * @return
     */
    Map<String, Object> getInvoiceSwitchInfo(@Param("shopId") Integer shopId);

    /**
     * 查询交易 订单明细列表
     */
    IPage<SellingOrderVO> selectSellingOrderNew(IPage<SellingOrderVO> page, @Param("param") SellingInputDTO param);

    /**
     * 查询交易 订单明细 订单总金额
     */
    BigDecimal querySellingOrderMoneynNew(@Param("param") SellingInputDTO param);

    /**
     * 查询交易 订单明细列表导出
     */
    List<SellingOrderVO> orderSellingDaoTransactionExp(@Param("param") SellingInputDTO param);

    /**
     * 查询订单信息
     */
    OrderbaseDetailsparaVO queryorderDetailparam(@Param("orderId") String orderId);

    /**
     * 查询订单商品信息
     */
    List<GoodsAllByidVO> getGoodsAllByIdparam(@Param("orderId") String orderId);

    /**
     * 获取支付凭证信息
     */
    OdbPaymentVocherVO queryPaymentVocher(@Param("orderId") String orderId);

    /**
     * 查询卖出交易订单信息
     */
    IPage<SellingOrderVO> selectSellingOrder(IPage<SellingOrderVO> page, @Param("param") SellingInputDTO param);

    /**
     * 查询卖出交易订单总金额
     */
    BigDecimal querySellingOrderMoney(@Param("param") SellingInputDTO param);


    /**
     * 更新基础订单
     *
     * @param param
     * @return
     */
    Integer updateOrderBaseById(@Param("param") Map<String, Object> param);


    /**
     * 更新订单基本返回方法状态
     *
     * @param returnMethodStatus
     * @param orderId
     * @return
     */
    Integer updateOrderBaseReturnMethodStatus(@Param("returnMethodStatus") Integer returnMethodStatus, @Param("orderId") String orderId);

    /**
     * 判断该订单是否是虚拟订单或者是门店自提订单
     */
    Map<String, Object> queryisVirtualOrder(@Param("orderId") String orderId, @Param("isNum") Integer isNum);

    /**
     * 为虚拟订单添加兑换码
     */
    Integer addRedeemCode(@Param("param") Map<String, Object> param);

    /**
     * 查询下单所需参数
     */
    OrderToInformParaVO queryBaseParaByInt(@Param("payNumber") String payNumber);

    /**
     * 插入系统消息
     */
    boolean insertSysMessage(@Param("orderId") String orderId, @Param("sellerId") String sellerId, @Param("sellerName") String sellerName,
                             @Param("messageType") Integer messageType, @Param("messageTitle") String messageTitle,
                             @Param("messageCreateTime") String messageCreateTime, @Param("messageContent") String messageContent, @Param("shopId") String shopId);

    /**
     * 查询下单所需参数
     */
    List<OrderToInformParaVO> queryBasePara(@Param("payNumber") String payNumber);

    /**
     * 获取支付单号
     */
    String queryUpayByOrderId(@Param("order_id") String order_id);

    /**
     * 更改状态
     */
    boolean updateOrderBaseByPaymentByPureDigital(@Param("orderStatus") Integer orderStatus, @Param("paymentId") Integer paymentId,
                                                  @Param("paymentName") String paymentName, @Param("paymentTime") String paymentTime,
                                                  @Param("paymentNumbers") String paymentNumbers, @Param("payCode") Integer payCode);

    /**
     * 更新OrderBase支付等字段
     */
    boolean updateOrderBaseByPayment(@Param("orderStatus") Integer orderStatus, @Param("payCode") Integer payCode, @Param("paymentId") Integer paymentId,
                                     @Param("paymentName") String paymentName, @Param("paymentTime") String paymentTime,
                                     @Param("paymentNumbers") String paymentNumbers);

    /**
     * 根据支付号查询实际支付单号
     */
    List<String> queryActualOrderId(@Param("paymentNumbers") String paymentNumbers);

    /**
     * 更新支付凭证
     * @param param
     * @return
     */
    Integer updatePaymentVocher(QukVocherImagesDTO param);

    /**
     *  订单之线下订单 导出
     * @param mapobject
     * @return
     */
    List<SellingOrderVO> PlatFormOfflineOrderEXcel(@Param("param") Map<Object, Object> mapobject);

    /**
     *  订单之卖出交易
     * @param page
     * @param param
     * @return
     */
    IPage<SellingOrderVO> selectSellingOrderNew2(IPage<SellingOrderVO> page, @Param("param") SellingInputNewDTO param);

    /**
     * 订单之卖出交易 导出
     *
     * @param param
     */
    List<SellingOrderVO> selectSellingOrderNewEXcel(@Param("param") SellingInputNewDTO param);


    /**
     * 查询商品总价格
     * @param param
     * @return
     */
    String querySellingOrderMoneynNew2(@Param("param") SellingInputNewDTO param);

    /**
     * 查询卖家中心订单发票列表
     *
     * @param param
     * @return
     */
    IPage<SellerOrderInvoiceVO> querySellerOrderInvoiceInfo(IPage<SellerOrderInvoiceVO> page , @Param("param") Map<String, Object> param);

    /**
     * 查询卖家中心订单发票列表总数
     *
     * @param param
     * @return
     */
    Integer querySellerOrderInvoiceInfoCount(@Param("param") Map<Object, Object> param);

    /**
     * 查询商品信息
     *
     * @param param
     * @return
     */
    List<OrderGoodsDetailVO> queryOrderGoodsInfo2(@Param("param") Map<String, Object> param);

    /**
     * 查询发票类型
     *
     * @param param
     * @return
     */
    Integer getInvoiceType(@Param("param") Map<String, Object> param);




    /**
     * 查询基础订单
     *
     * @param page
     * @param param
     * @return
     */
    IPage<OrderDetailsVO> queryOrderBase(IPage<OrderDetailsVO> page , @Param("param") Map<String, Object> param);
    /**
     * 商家查询订单
     *
     * @param orderId
     * @return
     */
    List<GoodsDetailsVO> queryOrders(@Param("orderId") String orderId);

    /**
     * 伪删除
     *
     * @param orderId
     * @return
     */
    boolean pseudoDelete(@Param("orderId") String orderId);


    /**
     * 查询供应商订单信息
     * @param page
     * @param baseMap
     * @return
     */
    IPage<OrderBaseVO> listSupplyBaseInfo(IPage<OrderBaseVO> page, @Param("param") Map<String, Object> baseMap);


    /**
     * 查询经销商订单信息
     * @param page
     * @param baseMap
     * @return
     */
    IPage<OrderBaseVO> listDealerBaseInfo(IPage<OrderBaseVO> page, @Param("param") Map<String, Object> baseMap);


    /**
     * 查询订单信息
     * @param page
     * @param baseMap
     * @return
     */
    IPage<OrderBaseVO> listBaseInfo(IPage<OrderBaseVO> page, @Param("param") Map<String, Object> baseMap);

    /**
     * 查询当日交易额
     *
     * @return
     */
    BigDecimal queryTodaySales();

    /**
     * 查询全部交易额
     *
     * @return
     */
    BigDecimal queryAllSales();

    /**
     * 查询本周交易额
     *
     * @return
     */
    BigDecimal queryWeekSales();

    /**
     * 查询本月交易额
     *
     * @return
     */
    BigDecimal queryMonthSales();

    /**
     * 查询年度交易额
     *
     * @return
     */
    BigDecimal queryYearSales();

    /**
     * 查询店铺全部排行
     *
     * @return
     */
    List<StoreParaVO> queryAllStore();

    /**
     * 查询店铺本日排行
     *
     * @return
     */
    List<StoreParaVO> queryTodayStore();

    /**
     * 查询店铺本周排行
     *
     * @return
     */
    List<StoreParaVO> queryWeekStore();

    /**
     * 查询店铺本月排行
     *
     * @return
     */
    List<StoreParaVO> queryMonthStore();

    /**
     * 查询店铺本年排行
     *
     * @return
     */
    List<StoreParaVO> queryYearStore();


    /**
     * 获取订单详情
     *
     * @param orderNum
     * @return
     */
    MerchantsOrdersDetailsVO queryByOrderDetails(@Param("orderNum") String orderNum);

    /**
     * 查询商家后台订单详情下方订单详情
     *
     * @param orderNum
     * @return
     */
    List<AddOrderDetailsVO> queryNewOrderDetails(@Param("orderNum") String orderNum);

    /**
     * 查询分佣比例
     *
     * @param goodsId
     * @return
     */
    BigDecimal queryCatChouYong(@Param("goodsId") Integer goodsId);

    /**
     * 查询退货退款
     *
     * @param orderNum
     * @return
     */
    List<ReturnOrderDetailsVO> queryReturnOrderDetails(@Param("orderNum") String orderNum);

    /**
     * 更新基础
     *
     * @param mapDigital
     * @return
     */
    boolean updateBaseByPureDigital(Map<String, Object> mapDigital);

    /**
     * 订单基准更新为付款
     *
     * @param mapDigital
     * @return
     */
    boolean fiveUpdateOrderBaseToPaymentByPureDigital(Map<String, Object> mapDigital);

    /**
     * 订单商品
     *
     * @param orderStatus
     * @param paymentNumber
     * @return
     */
    boolean fiveUpdateOrderGoodsToGoodsStatusByPureDigital(@Param("orderStatus") Integer orderStatus,
                                                           @Param("paymentNumber") String paymentNumber);

    /**
     * 更新基础付款
     *
     * @param mapDigital
     * @return
     */
    boolean updateBaseToPayment(Map<String, Object> mapDigital);

    /**
     * 更新订单基础付款
     *
     * @param mapDigital
     * @return
     */
    boolean fiveUpdateOrderBaseToPayment(Map<String, Object> mapDigital);

    /**
     * 查询订单
     *
     * @param paymentNumber
     * @return
     */
    List<String> queryOrderIdForPayNumber(@Param("paymentNumber") String paymentNumber);

    /**
     * 订单商品和商品状态
     *
     * @param orderStatus
     * @param orderNumber
     * @return
     */
    boolean fiveUpdateOrderGoodsToGoodsStatus(@Param("orderStatus") Integer orderStatus,
                                              @Param("orderNumber") String orderNumber);

    /**
     * 供应商 创建订单
     *
     * @param orderId
     * @param shopId
     * @param orderGateShopId
     * @param shopName
     * @param userId
     * @param userName
     * @param sellerId
     * @param sellerUserName
     * @param orderDate
     * @param orderGoodsTime
     * @param orderReceiverName
     * @param orderReceiverAddress
     * @param orderReceiverContact
     * @param orderReceiverProvinceId
     * @param orderReceiverCityId
     * @param orderReceiverAreaId
     * @param paymentNumber
     * @param invoiceName
     * @param invoiceId
     * @param shopPrice
     * @param orderBasePaymentAmount
     * @param orderDiscountFee
     * @param shippingFee
     * @param orderBuyerEvaluationStatusInteger
     * @param buyerMessage
     * @param orderStatus
     * @param orderDiscountType
     * @param couponPrice
     * @param voucherId
     * @param orderFromNum
     * @param redpacketId
     * @param redPacketPrice
     * @param redPacketSumMoney
     * @param platformVoucherCode
     * @param platformVoucherPrice
     * @param platformVoucherShopPrice
     * @param districtId
     * @param parentShopId
     * @param inviteSubsiteId
     * @param treasureOrderShopId
     * @param orderPromotionId
     * @param groupbuyStatus
     * @param orderBuyId
     * @param smallOrder
     * @param liveId
     * @param accountId
     * @param virtualGoods
     * @param periodOfValidity
     * @param pastDue
     * @param shopDistributorId
     * @param orderType
     * @param deliverShopId
     * @param deliverShopName
     * @param orderSupplyPrice
     * @param shareUserId
     * @param integralGoods
     * @param totalIntegral
     * @param orderIsShopTake
     * @param dropShipping
     * @param dealerCommission
     * @param supplyCommission
     * @param orderBaseCommission
     * @param baseMemberDiscount
     */
    void insertSupplierByOrderBase(@Param("orderId") String orderId, @Param("shopId") Integer shopId, @Param("orderGateShopId") Integer orderGateShopId,
                                   @Param("shopName") String shopName, @Param("userId") String userId, @Param("userName") String userName,
                                   @Param("sellerId") String sellerId, @Param("sellerUserName") String sellerUserName,
                                   @Param("orderDate") String orderDate, @Param("orderGoodsTime") String orderGoodsTime,
                                   @Param("orderReceiverName") String orderReceiverName,
                                   @Param("orderReceiverAddress") String orderReceiverAddress,
                                   @Param("orderReceiverContact") String orderReceiverContact,
                                   @Param("orderReceiverProvinceId") Integer orderReceiverProvinceId,
                                   @Param("orderReceiverCityId") Integer orderReceiverCityId,
                                   @Param("orderReceiverAreaId") Integer orderReceiverAreaId, @Param("paymentNumber") String paymentNumber,
                                   @Param("invoiceName") String invoiceName, @Param("invoiceId") Integer invoiceId,
                                   @Param("shopPrice") BigDecimal shopPrice,
                                   @Param("orderBasePaymentAmount") BigDecimal orderBasePaymentAmount,
                                   @Param("orderDiscountFee") BigDecimal orderDiscountFee, @Param("shippingFee") BigDecimal shippingFee,
                                   @Param("orderBuyerEvaluationStatusInteger") Integer orderBuyerEvaluationStatusInteger,
                                   @Param("buyerMessage") String buyerMessage, @Param("orderStatus") Integer orderStatus,
                                   @Param("orderDiscountType") Integer orderDiscountType, @Param("couponPrice") BigDecimal couponPrice,
                                   @Param("voucherId") String voucherId, @Param("orderFromNum") Integer orderFromNum,
                                   @Param("redpacketId") String redpacketId, @Param("redPacketPrice") BigDecimal redPacketPrice,
                                   @Param("redPacketSumMoney") BigDecimal redPacketSumMoney, @Param("platformVoucherCode") String platformVoucherCode, @Param("platformVoucherPrice") BigDecimal platformVoucherPrice, @Param("platformVoucherShopPrice") BigDecimal platformVoucherShopPrice, @Param("districtId") Integer districtId, @Param("parentShopId") Integer parentShopId,
                                   @Param("inviteSubsiteId") Integer inviteSubsiteId, @Param("treasureOrderShopId") Integer treasureOrderShopId, @Param("orderPromotionId") Integer orderPromotionId, @Param("groupbuyStatus") Integer groupbuyStatus, @Param("orderBuyId") String orderBuyId, @Param("smallOrder") Integer smallOrder, @Param("liveId") String liveId, @Param("accountId") String accountId,
                                   @Param("virtualGoods") Integer virtualGoods, @Param("periodOfValidity") String periodOfValidity,
                                   @Param("pastDue") Integer pastDue, @Param("shopDistributorId") Integer shopDistributorId, @Param("orderType") Integer orderType, @Param("deliverShopId") Integer deliverShopId, @Param("deliverShopName") String deliverShopName,
                                   @Param("orderSupplyPrice") BigDecimal orderSupplyPrice, @Param("shareUserId") Integer shareUserId, @Param("integralGoods") Integer integralGoods, @Param("totalIntegral") Integer totalIntegral, @Param("orderIsShopTake") Integer orderIsShopTake, @Param("dropShipping") Integer dropShipping, @Param("dealerCommission") BigDecimal dealerCommission,
                                   @Param("supplyCommission") BigDecimal supplyCommission, @Param("orderBaseCommission") BigDecimal orderBaseCommission, @Param("baseMemberDiscount") BigDecimal baseMemberDiscount, @Param("distributionDiscount") BigDecimal distributionDiscount);


    /**
     * 查询城市分站
     *
     * @param subSiteId
     * @return
     */
    String queryAerasBySub(Integer subSiteId);

    /**
     * 店铺联营商渠道
     *
     * @param
     * @return
     */
    List<String> queryfranchisesType();


    /**
     * 查询店铺id
     * @param districtIds
     * @param isNotshopId
     * @return
     */
    List<String> queryShopBudistrictAndshopIdNo(@Param("districtIds") String districtIds,
                                                @Param("isNotshopId") String isNotshopId);


    /**
     * 查询用户id
     * @param parentShopid
     * @return
     */
    List<String> queryUserByparentShopId(@Param("parentShopid") String parentShopid);


    /**
     * 查询订单交易信息
     * @param page
     * @param param
     * @return
     */
    IPage<PlatFormMemberSelfQueryVO> queryPlatFormMemberSelfPard(IPage<PlatFormMemberSelfQueryVO> page, @Param("param") PlatFormMemberSelfQueryDTO param);


    /**
     * 查询订单商品总价
     * @param param
     * @return
     */
    String queryMemberSelfMoney(PlatFormMemberSelfQueryDTO param);


    /**
     * 更新基础订单
     *
     * @param mapGoods
     * @return
     */
    boolean updateByOrderBase(Map<String, Object> mapGoods);

    /**
     * 物流消息
     *
     * @param page
     * @param map
     * @return
     */
    IPage<OrderListVO> selByOrderBase(IPage<OrderListVO> page, @Param("map") Map<String, Object> map);

    /**
     * 查询订单商品信息
     * @param orderId
     * @return
     */
    List<GoodsDetailsListVO> queryGoodsList1(@Param("orderId") String orderId);


    /**
     * 分页查询月销售报告
     *
     * @param page
     * @param param
     * @return
     */
    IPage<MonthReportSalesVO> queryMonthsaleReport(IPage<MonthReportSalesVO> page, @Param("param") MonthReportDTO param);

    /**
     * 查询月销售报告导出
     *
     * @param param
     * @return
     */
    List<MonthReportSalesVO> queryMonthsaleReportExcel(@Param("param") MonthReportDTO param);


    /**
     * 查询商品详情
     *
     * @param orderId
     * @return
     */
    List<GoodsDetailsVO> queryGoodsDetail(@Param("orderId") String orderId);


    /**
     * 查询真实订单
     *
     * @param param
     * @return
     */
    List<PlatFormMemberSelfQueryVO> queryRealOrderSelfPardExccel(@Param("param") RealOrderSelfDTO param);

    /**
     * 平台财务订单 列表查询
     *
     * @param param
     * @return
     */
    IPage<PlatFormMemberSelfQueryVO> queryRealOrderSelfPard(IPage<PlatFormMemberSelfQueryVO> page, @Param("param") RealOrderSelfDTO param);

    /**
     * 更新基础订单
     *
     * @param map
     * @return
     */
    Integer updateOrderBaseByMap(@Param("param") Map<String, Object> map);

    /**
     * 未下架数量
     * @param shopId
     * @return
     */
    Integer selectGoodsStatus(@Param("shopId") Integer shopId);


    /**
     * 未发货/未结算
     * @param shopId
     * @return
     */
    Map<String, Object> setNoSendGoods(@Param("shopId") Integer shopId);

    /**
     * 查询Exchange列表
     *
     * @param page
     * @param param
     * @return
     */
    IPage<OrderBaseEntity> queryExchangeList(IPage<OrderBaseEntity> page, @Param("param") Map<String, Object> param);

    /**
     * 查询门店顶顶那
     *
     * @param page
     * @param map
     * @return
     */
    IPage<OrderListVO> queryGateOrdersList(IPage<OrderListVO> page, @Param("param") Map<String, Object> map);

    /**
     * 查询订单
     *
     * @param page
     * @param map
     * @return
     */
    IPage<OrderListVO> queryOrderListByPhone(IPage<OrderListVO> page, @Param("param") Map<String, Object> map);

    /**
     * 分页查询虚拟订单
     *
     * @param page
     * @param map
     * @return
     */
    IPage<OrderDetailsVO> queryVirtualOrderBase(Page<OrderDetailsVO> page, @Param("param") Map<String, Object> map);

    /**
     * 分页查询成员用户订单详细信息
     *
     * @param page
     * @param map
     * @return
     */
    IPage<UserInfoOrderDetailVO> queryMemberUserOrderDetail(IPage<UserInfoOrderDetailVO> page, @Param("param") Map<String, Object> map);

    /**
     * 分页查询店铺订单
     *
     * @param page
     * @param map
     * @return
     */
    IPage<GateShopOrdersVO> queryGateShopOrders(IPage<GateShopOrdersVO> page, @Param("param") Map<String, Object> map);

    /**
     * 根据 核销码查询 门店订单详情
     * @param redeemCode
     * @param orderGateShopId
     * @return
     */
    Map<String, Object> queryGateShopCancelOrderDetails(@Param("redeemCode") String redeemCode,@Param("orderGateShopId")String orderGateShopId );

    /**
     * 根据核销码查看门店订单详情
     * @param redeemCode
     * @param shopId
     * @return
     */
    OrderDetailsVO queryGateShopOrderDetails(@Param("redeemCode") String redeemCode, @Param("shopId") String shopId);

    /**
     * 根据核销码核销门店订单
     *
     * @param redeemCode
     * @param updateTime
     * @return
     */
    Integer updateGateShopOrderCancel(@Param("redeemCode") String redeemCode, @Param("updateTime") String updateTime,
                                      @Param("orderId") String orderId, @Param("shopId") String shopId);

    /**
     * 分页查询真实店铺订单
     *
     * @param page
     * @param map
     * @return
     */
    IPage<VirtualGateShopOrderVO> queryVirtualGateShopOrders(IPage<VirtualGateShopOrderVO> page, @Param("param") Map<String, Object> map);

    /**
     * 供应商  待发货订单
     * @param page
     * @param paramMap
     * @return
     */
    IPage<ShipmentsByOrderBaseVO> queryShipmentsOrderBase(IPage<ShipmentsByOrderBaseVO> page, @Param("param")Map<String, Object> paramMap);

    /**
     * 供应商 已售经销，已售自销订单
     * @param page
     * @param paramMap
     * @return
     */
    IPage<OrderDetailsVO> querySupplyOrderBase(IPage<OrderDetailsVO> page, @Param("param")Map<String, Object> paramMap);

    /**
     * 查询商家订单
     * @param page
     * @param map
     * @return
     */
    IPage<OrderDetailsVO> queryGateShopTakeOrderBase(Page<OrderDetailsVO> page,@Param("param")Map<String, Object> map);

    /**
     * 根据卖家id 和核销码查询 订单详情
     * @param redeemCode
     * @param userId
     * @return
     */
    Map<String, Object> queryCancelOrderDetails(@Param("redeemCode") String redeemCode,@Param("userId")String userId,@Param("shopId")String shopId);

    /**
     * 根据核销码查看虚拟订单详情
     *
     * @param redeemCode
     * @return
     */
    OrderDetailsVO queryOrderDetails(@Param("redeemCode") String redeemCode, @Param("shopId") String shopId);

    /**
     * 根据核销码核销订单
     *
     * @param redeemCode
     * @param updateTime
     * @return
     */
    Integer updateOrderCancel(@Param("redeemCode") String redeemCode, @Param("updateTime") String updateTime,
                              @Param("orderId") String orderId, @Param("shopId") String shopId);

    /**
     * 查询商家经销明细
     * @param page
     * @param map
     * @return
     */
    IPage<DealerOrderDetailVO> queryDealerOrderBase(Page<DealerOrderDetailVO> page,@Param("param")Map<String, Object> map);

    /**
     * 更改物流编号
     *
     * @param orderId
     * @param orderShippingMessage
     * @param orderShippingCode
     * @return
     */
    boolean updateChangeShipmentsByBase(@Param("orderId") String orderId, @Param("orderShippingCode") String orderShippingCode, @Param("orderShippingMessage") String orderShippingMessage);

    /**
     * 更改物流编号
     *
     * @param orderId
     * @param orderShippingCode
     * @param orderShippingMessage
     * @return
     */
    boolean updateChangeShipmentsByGoods(@Param("orderId") String orderId, @Param("orderShippingCode") String orderShippingCode, @Param("orderShippingMessage") String orderShippingMessage);

    /**
     * 查询收货人联系方式
     *
     * @param orderId
     * @return
     */
    String queryReceiverPhone(@Param("orderId") String orderId);

    /**
     * 更改物流编号
     *
     * @param orderId
     * @param orderShippingMessage
     * @param orderShippingCode
     * @return
     */
    boolean updateChangeAllShipmentsByBase(@Param("orderId") String orderId, @Param("orderShippingExpressId") Integer orderShippingExpressId, @Param("orderShippingCode") String orderShippingCode, @Param("orderShippingMessage") String orderShippingMessage);

    /**
     * 更改物流编号
     *
     * @param orderId
     * @param orderShippingCode
     * @param orderShippingMessage
     * @return
     */
    boolean updateChangeAllShipmentsByGoods(@Param("orderId") String orderId, @Param("orderShippingExpressId") Integer orderShippingExpressId, @Param("orderShippingCode") String orderShippingCode, @Param("orderShippingMessage") String orderShippingMessage);


    /**
     * 查询买家订单记录
     * @param page
     * @param param
     * @return
     */
    IPage<UserInfoOrderDetailVO> queryUserorderInfoList(IPage<UserInfoOrderDetailVO> page , @Param("param") Map<String, Object> param);

    /**
     * 更新订单库分隔发货
     *
     * @param mapBase
     * @return
     */
    boolean updateSeparateShipmentsByOrderBase(Map<String, Object> mapBase);

    /**
     * 更新店铺订单系统消息
     * @param shopId
     * @param orderId
     * @return
     */
    boolean updateOrderMessageProcessingStatus(@Param("shopId") String shopId,
                                               @Param("orderId") String orderId);

    /**
     * 变更地址信息
     *
     * @param mapInfo
     * @return
     */
    boolean updateAddressInformation(Map<String, Object> mapInfo);

    /**
     * 批量发货订单导出
     *
     * @param orderIds
     * @return
     */
    List<ShipmentsOrderDetailDTO> batchShipmentsOrderExport(@Param("orderIds") List<String> orderIds);

    /**
     * 分页查询商店ID参数选择订单
     *
     * @param page
     * @param param
     * @return
     */
    IPage<ManageOrderbaseListVO> selectOrderbaseByShopIdParam(Page<ManageOrderbaseListVO> page,
                                                              @Param("param") RetrunQueryPrintDTO param);


    /**
     * 查询发货导出参数
     *
     * @param mapExport
     * @return
     */
    List<SoldOrderExportDTO> queryShippingExportParams(Map<String, Object> mapExport);

    /**
     * 回收站界面(商品详情)
     * @param orderId
     * @return
     */
    List<GoodsDetailsVO> queryRecycleBin(@Param("orderId") String orderId);

    /**
     * 查询物流公司信息
     *
     * @param orderId
     * @return
     */
    List<LogisticsMessageVO> queryLogisticsMessage(@Param("orderId") String orderId);

    /**
     *	查询商品名与商品图
     *
     * @param expCode
     * @param orderId
     * @return
     */
    List<ShippingGoodsMessageVO> queryGoodsMessage(@Param("expCode") String expCode, @Param("orderId") String orderId);

    /**
     * 查询物流名称
     *
     * @param expressId
     * @return
     */
    String queryExpressNameById(@Param("expressId") Integer expressId);

    /**
     * 查询用户电话
     * @param orderId
     * @return
     */
    Map<String, String> queryUserPhone2(@Param("orderId") String orderId);


    /**
     * 更新商店隐藏
     *
     * @param isShopHidden
     * @param orderId
     * @return
     */
    boolean updateShopHidden(@Param("isShopHidden") Integer isShopHidden, @Param("orderId") String orderId);

    /**
     * 分页查询基础订单
     *
     * @param page
     * @param map
     * @return
     */
    IPage<OrderDetailsVO> queryRecycleBinByOrderBase(IPage<OrderDetailsVO> page, @Param("map") Map<String, Object> map);


    /**
     * 查询订单快递信息
     * @param virtualGoods
     * @param shopId
     * @param allOrderStatus
     * @param otherOrderStatus
     * @param userName
     * @param orderNum
     * @param goodsName
     * @param orderStartTime
     * @param orderEndTime
     * @return
     */
    List<OrderDetailsVO> queryRecycleBinByOrderBaseExcel(@Param("virtualGoods") Integer virtualGoods ,@Param("shopId") Integer shopId,
                                                       @Param("allOrderStatus") String allOrderStatus, @Param("otherOrderStatus") Integer otherOrderStatus,
                                                       @Param("userName") String userName, @Param("orderNum") String orderNum,
                                                       @Param("goodsName") String goodsName, @Param("orderStartTime") String orderStartTime,
                                                       @Param("orderEndTime") String orderEndTime);

    /**
     * 查询订单价格
     *
     * @param orderId
     * @return
     */
    BigDecimal calculateTotalPrice(@Param("orderId") String orderId);

    /**
     * 查询goods表实付
     *
     * @param orderId
     * @return
     */
    BigDecimal queryGoodsPaymentPrice(@Param("orderId") String orderId, @Param("goodsId") Integer goodsId);

    /**
     * 查询改价价格
     *
     * @param orderId
     * @return
     */
    BigDecimal queryBeforeAdjustPrice(@Param("orderId") String orderId, @Param("goodsId") Integer goodsId);

    /**
     * 查询改价
     * @param orderId
     * @return
     */
    BigDecimal queryOrderBaseBeforeAdjustPrice(String orderId);

    /**
     * 更改goods表实付金额
     *
     * @param orderId
     * @param price
     * @param goodsId
     * @return
     */
    boolean updateOrderGoodsPaymentAmountAdd(@Param("orderId") String orderId, @Param("price") BigDecimal price,
                                             @Param("adjustPrice") String adjustPrice, @Param("goodsId") Integer goodsId,
                                             @Param("isChangePrice") Integer isChangePrice);

    /**
     * 更改goods表实付金额
     *
     * @param orderId
     * @param price
     * @param goodsId
     * @return
     */
    boolean updateOrderGoodsPaymentAmountSubtract(@Param("orderId") String orderId, @Param("price") BigDecimal price,
                                                  @Param("adjustPrice") String adjustPrice, @Param("goodsId") Integer goodsId,
                                                  @Param("isChangePrice") Integer isChangePrice);

    /**
     * 更改base表实付金额
     *
     * @param orderId
     * @param calculateAfterMoney
     * @return
     */
    boolean updateOrderBasePaymentAmount(@Param("orderId") String orderId, @Param("calculateAfterMoney") BigDecimal calculateAfterMoney,
                                         @Param("adjustPrice") String adjustPrice);

    /**
     * 取消订单Record
     *
     * @param orderId
     * @return
     */
    boolean updateOrderPaymentAmountByRecord(@Param("orderId")String orderId,@Param("calculateAfterMoney") BigDecimal calculateAfterMoney);

    /**
     * 取消订单Trade
     *
     * @param orderId
     * @return
     */
    boolean updateOrderPaymentAmountByTrade(@Param("orderId")String orderId,@Param("calculateAfterMoney") BigDecimal calculateAfterMoney);


    /**
     * webm门店核销记录
     * @param page
     * @param param
     * @return
     */
    IPage<QueryCancelRecordResultVO> queryCancelShopGateRecord2(IPage<QueryCancelRecordResultVO> page , @Param("param") PageUserTokenBeanDTO param);

    /**
     * webm门店核销记录
     * @param page
     * @param param
     * @return
     */
    IPage<QueryCancelRecordResultVO> queryCancelShopGateRecord(IPage<QueryCancelRecordResultVO> page , @Param("param") PageUserTokenBeanDTO param);


    /**
     * 查询虚拟商品用户
     *
     * @param page
     * @return
     */
    List<String> queryVirtualGoodsUser2(@Param("page") PageUserTokenBeanDTO page);

    /**
     * 查询虚拟商品用户数量
     *
     * @param page
     * @return
     */
    Integer queryVirtualGoodsUserCount2(@Param("page") PageUserTokenBeanDTO page);

    /**
     * 查询虚拟商品用户
     *
     * @param page
     * @return
     */
    List<String> queryVirtualGoodsUser(@Param("page") PageUserTokenBeanDTO page);

    /**
     * 查询虚拟商品用户数量
     *
     * @param page
     * @return
     */
    Integer queryVirtualGoodsUserCount(@Param("page") PageUserTokenBeanDTO page);

    /**
     * 查询用户信息
     *
     * @param userId
     * @return
     */
    Map<String, Object> selectMembershipUserById(@Param("userId") String userId);


    /**
     * 分页查询记录
     * @param page
     * @param param
     * @return
     */
    IPage<QueryCancelRecordResultVO> queryCancelRecord2(Page<QueryCancelRecordResultVO> page, @Param("param") Map<String,Object> param);

    /**
     * 分页查询记录
     * @param page
     * @param param
     * @return
     */
    IPage<QueryCancelRecordResultVO> queryCancelRecord(Page<QueryCancelRecordResultVO> page, @Param("param") Map<String,Object> param);

    /**
     * 分页查询订单集合
     *
     * @param page
     * @param mapOrder
     * @return
     */
    IPage<OrderListVO> queryOrderList(IPage<OrderListVO> page, @Param("param") Map<String, Object> mapOrder);


    /**
     * 查询店铺批量打印快递鸟信息
     * @param shopId
     * @return
     */
    ShopkdniaoVO queryKdniaoConfig(@Param("shopId")Integer shopId);


    /**
     * 根据店铺id获取EBussinessID和AppKey
     * @param shipId
     * @return
     */
    ShopdpexpressVO queryShopdexpress(@Param("shopId") Integer shipId);

    /**
     * 根据快递名查询店铺批量打印快递鸟信息
     * @param expressName
     * @return
     */
    KdniaoExpressVO querykdniaoExpressByparam(@Param("expressName") String expressName);


    /**
     * 查询发货地址
     * @param shippingAddressId
     * @return
     */
    ShopShippingAddressVO selectShippingAddress(@Param("addressId") Integer shippingAddressId);


    /**
     * 查询地址信息
     * @param districtId
     * @return
     */
    BaseDistrictVO selectOrderArea(@Param("districtId") Integer districtId);


    /**
     * 更新合并支付信息
     * @param orderId
     * @return
     */
    int updateUnionOrderState(@Param("orderId")String orderId);

    /**
     * 更新交易订单
     * @param orderId
     * @return
     */
    int updateConsumeTradeState(@Param("orderId")String orderId);

    /**
     * 更新交易明细
     * @param orderId
     * @return
     */
    int updateConsunmRecordState(@Param("orderId")String orderId);


    /**
     * 查询基于店铺列表的订单
     *
     * @param mapShop
     * @return
     */
    List<SoldOrderExportDTO> queryOrderBaseOfShopList(Map<String, Object> mapShop);

    /**
     * 查订单总额和运费
     * @param orderId
     * @return
     */
    Map queryorderpaymentamount(@Param("orderId")String orderId);


    /**
     * 查询红包和代金卷
     * @param orderId
     * @return
     */
    WapGoodsSaleSumUpdateVO queryRedByEnvelope(String orderId);

    /**
     * 查看会员是否过期
     * @param userId
     * @return
     */
    PlusMemberEntityVO selectplusmember(@Param("userId")String userId);

    /**
     * 退还plus会员折扣
     * @param userId
     * @param usedAmount
     */
    void updateplusmember(@Param("userId") String userId,@Param("usedAmount")BigDecimal usedAmount);

    /**
     * 发送站内信通知
     * @param platformMessage
     */
    void insertMessage(PlatformMessageVO platformMessage);


    /**
     * 查用户退款订单信息
     * @param orderId
     * @param shopId
     * @return
     */
    OrderStatusVO selectorderid(@Param("orderId") String orderId, @Param("shopId") Integer shopId);

    /**
     * 查询用户投诉信息
     * @param complaintsId
     * @param shopId
     * @return
     */
    OrderStatusVO selectcomplaintsid(@Param("complaintsId") String complaintsId,@Param("shopId") Integer shopId);


    /**
     * 查询未退款订单数量
     * @param orderid
     * @return
     */
    Integer queryisVirtualOrderByTime(String orderid);

    /**
     * 定时任务fegin-确认收货超过14天默认默认好评
     *
     * @return
     */
    List<AcquiescenceVO> queryNotEvaluatedOrder();


    /**
     * 统计日周月销售额
     *
     * @param shopId
     * @return
     */
    List<SaleRoomVO> querySaleByShopId(@Param("shopId") Integer shopId,@Param("shopType") Integer shopType);


    /**
     * 根据goodsId查询 积分商品的价格 所需积分 库存
     *
     * @param goodsId
     * @return
     */
    Map<String, Object> queryBygoodsId(Integer goodsId);

    /**
     * 查询店铺发货时长
     * @param shopId
     * @param goodId
     * @return
     */
    BigDecimal queryShippingTimeByGoods(@Param("shopId") Integer shopId,@Param("goodsId")Integer goodId);

    /**
     * 查询是否是供应商订单
     * @param orderId
     * @return
     */
    OrderPayInfoVO queryOrderInfo(@Param("orderId")String orderId);

    /**
     * 查询供应商订单信息
     * @param paymentNum
     * @return
     */
    List<DealerOrderGoodsVO> querySupplyOrder(String paymentNum);


    /**
     * 查询当前售卖区域模板下 的城市Id
     * @param transportAreaId
     * @return
     */
    String selectByTransportAreaIds(@Param("transportAreaId")Integer transportAreaId);




    /**
     * 查询当前商品是否是虚拟商品
     * @param goodsId
     * @return
     */
    Integer queryVirtualGoods(Integer goodsId);

    Integer getIntegralGoodsIsLimit(Integer goodsId);
}
